<?php
namespace AiSPRDocManager\Controller;

use AiSPRDocManager\Controller\Base as Base;
use AiSPRDocManager\Model as AiCvModel;

class Modified extends Base {

	const MENU_SLUG = 'modified';
	const MENU_ICON = '';
	const MENU_POSITION = 1437.3636;
	const MENU_PARENT_SLUG = 'sprdocmanager';

	public function initialise () {
		// add_submenu_page( $parent_slug, $page_title, $menu_title, $capability, $menu_slug, $function = '' )

		$sHookName = add_submenu_page(
			self::MENU_PARENT_SLUG,
			'SPR Doc Manager - Modified',
			'Modified',
			'edit_pages',
			self::MENU_SLUG,
			array($this, 'page')
			// self::MENU_ICON,
			// self::MENU_POSITION
		);

		add_action('admin_print_scripts-' . $sHookName, array($this, 'enqueueBootstrapJs'));
		add_action('admin_print_scripts-' . $sHookName, array($this, 'enqueDataTableJs'));
		add_action('admin_print_scripts-' . $sHookName, array($this, 'enqueModifiedJs'));

		add_action('admin_print_styles-' . $sHookName, array($this, 'enqueueBootstrapCss'));
		add_action('admin_print_styles-' . $sHookName, array($this, 'enqueueAdminCss'));
		add_action('admin_print_styles-' . $sHookName, array($this, 'enqueDataTableCustomCss'));



	}

	public function page() {
		$aContent = array();

		$oModelModified = new AiCvModel\Modified();
		$aContent = $oModelModified->action();

		include_once  aiCvManager_Plugin_Dir . '/src/view/modified.php';
	}

	public function enqueModifiedJs () {
		wp_enqueue_script( aiCvManager_Plugin_Slug . 'modified.js', aiCvManager_Plugin_Url . '/assets/js/modified.js', array('jquery'), $ver = false, $in_footer = false );
	}
}



?>